/**
 * 
 */
package org.swingannotations;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * Use this annotation to have swing widgets from
 * the view injected into the controller.  
 * Member variables in the controller annotated
 * with this will be given attention by
 * the document loader.
 * @author jduty
 *
 */
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.FIELD)
public @interface JReference {

	/** The name of the widget to inject. **/
	String name();
	
	/**
	 * if this is true, we will throw an exception if
	 * no swing widget can be found in the view to inject.  
	 * defaults to false if not set.
	 * @return
	 */
	public  boolean required() default false;
	
}
